Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MAX_HANDLES configurable at runtime #303

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

sree-revoori1
Copy link
Contributor

@sree-revoori1 sree-revoori1 commented Jan 22, 2024

To build DPE with a non-default number of MAX_HANDLES, you can run ARBITRARY_MAX_HANDLES=10 cargo build --features arbitrary_max_handles. If the ARBITRARY_MAX_HANDLES env var is not provided or is badly formatted, the default value of 24 will be used.

Some of the tests will fail for small numbers of max handles, but this is expected since the tests are intended for a DPE with 24 handles. In the future, we should add tests for DPEs where MAX_HANDLES=1, 2, etc.

Also, make support features disableable at compile time. Both of these changes will allow us to reduce the size of the DPE binary.

fixes #299
fixes #298

@sree-revoori1 sree-revoori1 changed the title Make MAX_HANDLES configurable at runtime Make MAX_HANDLES configurable at compile time Jan 22, 2024
@sree-revoori1 sree-revoori1 changed the title Make MAX_HANDLES configurable at compile time Make MAX_HANDLES configurable at runtime Jan 22, 2024
dpe/Cargo.toml Show resolved Hide resolved
dpe/src/context.rs Outdated Show resolved Hide resolved
To build DPE with a non-default number of MAX_HANDLES, you can
run ARBITRARY_MAX_HANDLES=10 cargo build --features arbitrary_max_handles.
If the ARBITRARY_MAX_HANDLES env var is not provided or is badly
formatted, the default value of 24 will be used.

Some of the tests will fail for small numbers of max handles,
but this is expected since the tests are intended for a DPE with 24
handles. In the future, we should add tests for DPEs where
MAX_HANDLES=1, 2, etc.

Also, make support features configurable at compile time.
@jhand2 jhand2 merged commit 410f50d into chipsalliance:main Jan 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make MAX_TCI_NODES configurable Make DPE features compile-time disableable
2 participants